<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<!-- RichFaces tag library declaration -->

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

 

<html>

      <head>

           <title>ACOTA Suggestion Box-Demo</title>

      </head>

      <body>

            <f:view>

                  <a4j:form>

                        <rich:panel header="ACOTA Suggestion Box" style="width: 315px">

                             <p>Suggestion Box will suggest you tags.</p>
    
					        <h:panelGrid columns="2" columnClasses="sb_test_column1,sb_test_column2" width="100%">
						            <h:panelGroup>
						                <h:inputText value="#{tagsBean.tag}" id="text" />
						                <rich:suggestionbox id="suggestionBoxId" for="text" 
						                    suggestionAction="#{tagsBean.autocomplete}" var="tag"
						                    fetchValue="#{tag.tag}"
						                    minChars="#{suggestionBox.minchars}"
						                    shadowOpacity="#{suggestionBox.shadowOpacity}"
						                    border="#{suggestionBox.border}" 
						                    width="#{suggestionBox.width}"
						                    height="#{suggestionBox.height}"
						                    shadowDepth="#{suggestionBox.shadowDepth}"
						                    cellpadding="#{suggestionBox.cellpadding}"
						                    nothingLabel="No tags found"
						                    usingSuggestObjects="true">
						                   <h:column>
						                        <h:outputText value="#{tag.tag}" />
						                    </h:column>
						                    <h:column>
						                        <h:outputText value="#{tag.provider}" style="font-style:italic" />
						                    </h:column>
						                </rich:suggestionbox>                
						           </h:panelGroup>
						        </h:panelGrid>

                        </rich:panel>

                  </a4j:form>

            </f:view>

      </body>

</html>